[index]
SelectedObject Function
Syntax
the selectedObject or selectedObject()
Description
The selectedObject function returns the reference of the currently selected object, if any.
In edit mode, the selected object is identified by the dotted "marching ants". In Browse mode, the selected object is the field or dataSheet that contains the insertion point, or is empty if no insertion point is placed.
Notes
Do not confuse the selectedObject function with the selectedField function. The selectedField function returns the name of the field that contains the currently selected text. The selectedObject function returns the reference of the object selected in edit mode.
Examples
Place a field, a bitmap, or other random objects on a card. Create a button called "Select Object" and place the following handler into its script:
on mouseUp
ask "Select which object?"
put it into theobject
do "select cd " & theobject
put the selectedObject into msg choose browse tool
end mouseUp
Click on the button and enter "field 1" or "bitmap 1" or any other object on the card. The above example puts the reference of the selected object into the Message Box.
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.